#ifndef GETCAMERAFRAME_THREAD_H
#define GETCAMERAFRAME_THREAD_H

#include <QImage>
#include <QThread>
#include <QSharedMemory>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

class GetCameraFrame_Thread : public QThread
{
    Q_OBJECT
public:
    GetCameraFrame_Thread(QObject *parent = nullptr);
    ~GetCameraFrame_Thread();
    bool GetVideoFrameQImage(QImage &Img);
protected:
    void run();

private:
    cv::VideoCapture m_cvCapture;
    bool m_bCameraOpen;
    bool m_bExit;
};


#endif // GETCAMERAFRAME_THREAD_H


